<?php
namespace c;

/**
 * Description of home
 *
 * @author YeFng
 */
class home extends \control
{
    function index_home()
    {
        $this->loadLayout('home');
    }
    function index_ll()
    {
        if (\YF_f::initC('\c\auth\permission')->login(TRUE))
            $this->loadTemplate('loginInfo');
        die;
    }
    function index_lui()
    {
        if (!\YF_f::initC('\c\auth\permission')->login(TRUE))
            ajax_json(TRUE);
        
        $a = array('status'=>TRUE);
        $a['shop_cart_num'] = $this->db->getOneField('shop_cart', 'count(*)', 'user_id='. \YF_f::$login_user_id);
        ajax_json($a);
    }
}
